﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Bussiness;

namespace WebApplication.Admin.Baocao
{
    public class Chi
    {
        public IQueryable<PhieuChi> GetPhieuChi(DateTime dt,string ngay)
        {
            var db = dataprovider.Entity.PHIEUCHIs;
            return db.Where(p => p.NgayChi == dt)
                .Select(p => new PhieuChi
                { 
                    Mapc=p.MaPC,
                    nhanvien=p.NHANVIEN.TENNV,
                    mahdn=p.MaHDN,
                    sotienchi=(int)p.SoTienDaTra_PC,
                    noidungchi=p.NoiDungChi,
                    ngay=ngay
                });
        }

        public class PhieuChi
        {
            public string Mapc { get; set; }
            public string nhanvien { get; set; }
            public string  mahdn { get; set; }
            public int sotienchi { get; set; }
            public string noidungchi { get; set; }
            public string ngay { get; set; }
        }
    }
}